package com.walker.taogong.hibernate;

import java.net.URL;
import java.util.List;

/**
 * Provides entity classes and mappings for Hibernate.
 * 
 * @author Alex Wei
 */
public interface MappingProvider
{
    /** 
     * Returns a list of entity classes. For each class Foo, a call of
     * getResource("Foo.hbm.xml") must return the mapping file for this 
     * class.
     * 
     * @return list of entity classes.
     */
    List<Class<?>> getEntityClasses();
    
    /**
     * Returns a list of Hibernate mapping files. This list must be used for
     * entities where the entity name does not match the class name, e.g.
     * when a given class is mapped to two or more entities.
     * @return
     */
    List<URL> getMappings();
}
